package com.kingdee.shr.custom.handler.test;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.ui.ModelMap;

import com.kingdee.bos.Context;
import com.kingdee.eas.custom.jqplatform.JqItemInfo;
import com.kingdee.eas.custom.jqplatform.SpecialItemInfo;
import com.kingdee.eas.framework.CoreBaseInfo;
import com.kingdee.shr.base.syssetting.context.SHRContext;
import com.kingdee.shr.base.syssetting.exception.SHRWebException;
import com.kingdee.shr.base.syssetting.web.handler.EditHandler;

/**
 * 
 * @copyright 天津金蝶软件有限公司 <br>
 *            Title: GetItemInfoEditHandler <br>
 *            Description: 测试获取关联属性值
 * @author 相建彬 Email:tjxiangjianbin@kingdee.com
 * @date 2019年8月15日
 */
public class GetItemInfoEditHandler extends EditHandler {

    private Context ctx;

    public GetItemInfoEditHandler(Context ctx) {
        this.ctx = ctx;
    }

    public GetItemInfoEditHandler() {
        this.ctx = SHRContext.getInstance().getContext();
    }

    /**
     * 
     * <p>
     * Title: getItemInfo
     * </p>
     * <p>
     * Description: 获取item值
     * </p>
     * 
     * @author 相建彬 <br/>
     * @param request
     * @param response
     * @param modelMap
     * @return
     */
    @Override
    protected void afterSave(HttpServletRequest request, HttpServletResponse response, CoreBaseInfo model)
            throws SHRWebException {
        super.afterSave(request, response, model);
        
        System.out.println("===================" + model + "===================");

        SpecialItemInfo info = (SpecialItemInfo) model;
        System.out.println("===================" + info.getNumber() + "*******" + info.getCreator()
                + "------------------"+info.getCreateTime()+"===================");

    }
}
